package com.aifeng.view

import android.view.View
import android.widget.ImageView
import com.aifeng.base.loadRoundedImage
import com.aifeng.hassan_food.R
import com.aifeng.model.CommonData
import com.zhpan.bannerview.BaseViewHolder

class ImageResourceViewHolder(itemView: View) : BaseViewHolder<CommonData>(itemView) {

    override fun bindData(data: CommonData, position: Int, pageSize: Int) {
        val ivImg = findView<ImageView>(R.id.item_banner)
        ivImg.loadRoundedImage(
            url = data.img ?: "",
            resourceId = R.mipmap.default_logo2
        )
    }

}